package contest;

import java.io.*;
import java.util.*;

public class IsitaRightTriangle {
	public static void main(String args[]){
		Scanner sc = new Scanner(new InputStreamReader(System.in));
		int value = sc.nextInt();
		for(int i=0;i<value;i++){
			int[] line = new int[3];
			for(int j=0;j<3;j++){
				line[j] = sc.nextInt();
			}
			Arrays.sort(line);
			if(line[2]*line[2] == line[1]*line[1]+line[0]*line[0]){
				System.out.println("YES");
			}else{
				System.out.println("NO");				
			}
		}
	}
}
